/**
 * @Author: sxiaohao
 * @Description:
 * @File:  routers
 * @Version: 1.0.0
 * @Date: 2020/10/28 下午9:40
 */

package router

import (
	"datum_textbook/controller"
	"datum_textbook/middleware"
	"github.com/gin-gonic/gin"
)

func SetupRouters() (r *gin.Engine) {
	r = gin.Default()
	r.Use(middleware.Cors())
	r.Use(middleware.DebugToFile())
	//r.Use(middleware.ParseToUid())
	datumGroup := r.Group("/pay")

	{
		datumGroup.GET("/order", controller.Order)
		datumGroup.GET("/notify", controller.Notify)
	}

	return
}
